Observers say mining investments in South Africa and Ghana could help Beijing weather geopolitical instability and potential sanctions.